home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / Notification.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  2.8 KB  |  106 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        Notification.h
  3.  
  4.      Contains:    Notification Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1989-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __NOTIFICATION__
  19. #define __NOTIFICATION__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __OSUTILS__
  25. #include <OSUtils.h>
  26. #endif
  27.  
  28.  
  29.  
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50. typedef struct NMRec                     NMRec;
  51. typedef NMRec *                            NMRecPtr;
  52. typedef CALLBACK_API( void , NMProcPtr )(NMRecPtr nmReqPtr);
  53. typedef STACK_UPP_TYPE(NMProcPtr)                                 NMUPP;
  54.  
  55. struct NMRec {
  56.     QElemPtr                         qLink;                        /* next queue entry*/
  57.     short                             qType;                        /* queue type -- ORD(nmType) = 8*/
  58.     short                             nmFlags;                    /* reserved*/
  59.     long                             nmPrivate;                    /* reserved*/
  60.     short                             nmReserved;                    /* reserved*/
  61.     short                             nmMark;                        /* item to mark in Apple menu*/
  62.     Handle                             nmIcon;                        /* handle to small icon*/
  63.     Handle                             nmSound;                    /* handle to sound record*/
  64.     StringPtr                         nmStr;                        /* string to appear in alert*/
  65.     NMUPP                             nmResp;                        /* pointer to response routine*/
  66.     long                             nmRefCon;                    /* for application use*/
  67. };
  68.  
  69. enum { uppNMProcInfo = 0x000000C0 };                             /* pascal no_return_value Func(4_bytes) */
  70. #define CallNMProc(userRoutine, nmReqPtr)                         CALL_ONE_PARAMETER_UPP((userRoutine), uppNMProcInfo, (nmReqPtr))
  71. #define NewNMProc(userRoutine)                                     (NMUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNMProcInfo, GetCurrentArchitecture())
  72.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  73.                                                                                             #pragma parameter __D0 NMInstall(__A0)
  74.                                                                                             #endif
  75. EXTERN_API( OSErr )
  76. NMInstall                        (NMRecPtr                 nmReqPtr)                            ONEWORDINLINE(0xA05E);
  77.  
  78.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  79.                                                                                             #pragma parameter __D0 NMRemove(__A0)
  80.                                                                                             #endif
  81. EXTERN_API( OSErr )
  82. NMRemove                        (NMRecPtr                 nmReqPtr)                            ONEWORDINLINE(0xA05F);
  83.  
  84.  
  85.  
  86. #if PRAGMA_STRUCT_ALIGN
  87.     #pragma options align=reset
  88. #elif PRAGMA_STRUCT_PACKPUSH
  89.     #pragma pack(pop)
  90. #elif PRAGMA_STRUCT_PACK
  91.     #pragma pack()
  92. #endif
  93.  
  94. #ifdef PRAGMA_IMPORT_OFF
  95. #pragma import off
  96. #elif PRAGMA_IMPORT
  97. #pragma import reset
  98. #endif
  99.  
  100. #ifdef __cplusplus
  101. }
  102. #endif
  103.  
  104. #endif /* __NOTIFICATION__ */
  105.  
  106.